<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link href="students/css/font-awesome.min.css" rel="stylesheet" type="text/css" media="all" />
    <link href="students/css/bootstrap.min.css" rel="stylesheet" type="text/css" media="all" />
    <link href="students/css/chromagallery.css" rel="stylesheet" type="text/css" media="all" />
    <link href="students/css/style.css" rel="stylesheet" type="text/css" media="all" />
    <link href="students/css/project-teacher.css" rel="stylesheet" type="text/css" media="all" />
    <title>指导教师</title>
</head>

<body>
    <?php
    require_once("./congfig/config.php");
    session_start(); 
    
     ?>
    <div class="navbar-wrapper">
        <div class="container">
            <nav class="navbar navbar-inverse navbar-static-top cl-effect-21">
                <div class="container">
                    <div id="navbar" class="navbar-collapse collapse">
                        <ul class="nav navbar-nav">
                            <li><a href="index.php">首页</a></li>
                            <li><a href="project-center.php">项目中心</a></li>
                            <li class="active"><a href="#">指导教师</a></li>
                            <li><a href="#About Us">关于我们</a></li>
                            <li><?php 
                            if (!isset($_SESSION['rank'])) {  ?>
                                <a href="login.php" style="font-size:13px;margin-left: 100px;">登陆/注册</a>
                            <?php  
                             }
                             elseif ($_SESSION['rank']==0){ ?>
                             <a href="students/owner-myProject.php" style="font-size:13px;margin-left: 100px;">学生：个人中心</a>
                            <?php 
                            }
                             
                             elseif ($_SESSION['rank']==1){ ?>
                             <a href="teacher/project-list.php" style="font-size:13px;margin-left: 100px;">老师：个人中心</a>
                            <?php 
                            }
                             
                             elseif ($_SESSION['rank']==2){ ?>
                             <a href="admin/project-list.php" style="font-size:13px;margin-left: 100px;">管理员中心</a>
                            <?php 
                            }
                             ?>
                                
                            </li>
                        </ul>
                    </div>
                </div>
            </nav>
        </div>
        <?php 
        $sql="select * from users where rank = 1 ";   
        $result=$conn->query($sql);
         ?>
        <!-- 教师列表 -->
        <div class="container" id="tList">
            <div class="row">
                <?php
                while ($row=$result->fetch_array()) {
                    $uid=$row["uid"];
                    $sql1="select * from userinfor where uid = $uid";
                    $result1=$conn->query($sql1);
                    $row1=$result1->fetch_array();
                    ?>
                    <div class="col-md-4">
                    <div class="thumbnail">
                        <img src="students/images/tx.png" class="img-responsive">
                        <div class="caption">
                            <h2 class="text-center"><?php echo $row1["realname"]; ?></h2>
                        </div>
                        <div class="text-center">
                            <p><?php echo $row["email"] ?></p>
                            <p><?php echo $row1["phone"] ?></p>
                        </div>
                    </div>
                </div>
                <?php 
                            } 
                 ?>
                



            </div>
        </div>
        <section class="footer" id="About Us" style="width: 100%;margin-top:100px;">
            <h2 class="text-center">THANKS FOR VISITING US</h2>
            <hr>
            <div class="container">
                <div class="row">
                    <div class="col-md-4  col-md-offset-4">
                        <div class="contact-info">
                            <div class="phone">
                                <i class="glyphicon glyphicon-phone-alt"></i>
                                <p class="p4">+00 1010101010</p>
                            </div>
                            <div class="email-info">
                                <i class="glyphicon glyphicon-envelope"></i>
                                <p class="p4">469902XXX@qq.com </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <hr>
            <div class="copyright">
                <p>Copyright &copy; 2018.徐志摩 </p>
            </div>
        </section>
    </div>
</body>

</html>